s=1
n=eval(input("请输入一个整数:"))
for i in range (1,n+1):
    print(i)
    s=s*i
print(s)
